package com.design.graduation.asdemo.view;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.util.AttributeSet;
import android.view.View;

import com.design.graduation.asdemo.R;

/**
 * Created by lijinyuan on 16/2/22.
 */
public class MatrixView extends View {

    private Bitmap mBitmap;
    private Matrix mMatrix;

    public MatrixView(Context context) {
        super(context);
    }

    public MatrixView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView();
    }

    public MatrixView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    private void initView() {
        mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.appintro1);

        setImgMatrix(new Matrix());

    }

    public void setImgMatrix(Matrix matrix) {
        mMatrix = matrix;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

    }

}
